-
Notifications
You must be signed in to change notification settings - Fork 874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes for Java module graph (GH4227) #5668
Conversation
Need to use getModule() rather than getTypeDecls() to access ModuleTree in dependency calculation. Fixes GH4227.
Fix a stack overflow in the module graph search due to nodes being visited multiple times.
TIL that NB has a module graph for the java module system |
while clicking around I found a NPE, however this isn't caused by this PR (click on the "Show Readability" icon on the right)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Learned something new. I like this graph.
Thanks @mbien Hadn't noticed that NPE with readability - wasn't an issue with the project I was testing the graph with, but have replicated on another one. This is a useful graph but could do with some additional work for sure. The JDK module filtering also doesn't seem to work correctly. Will merge this so the graph works at all, then we can work out what else needs fixing! 😄 |
Fixes #4227 - Java module graph component failing to display with a NPE. This is caused by the same issue as fixed in #4780 whereby the module tree is no longer available from
cc.getCompilationUnit().getTypeDecls()
and should be obtained bycc.getCompilationUnit().getModule()
. Need to look across the code base for other instances of this problem.Second commit fixes a stack overflow noticed in the search function on the graph. This seems to be due to circular dependencies being reported in the underlying dependency graph - probably some other issues to look at there, but at least it doesn't blow up for now!